#include "UNetOnnx.h"
#include "time.h"
/***
 *
 * PATH=D:\Development\Envs\openvino_2024.6\runtime\3rdparty\tbb\bin;D:\Development\Envs\openvino_2024.6\runtime\bin\intel64\Debug;D:\Development\Envs\OpenCV460\Binary\x64\vc16\bin
 */
int main(){
    double start, end;
    std::string model_path = "../../../3-NNUnetWithOnnxAndOpenVino/v1_onnx.onnx";
    std::string sampleImage = "../../../resource/raw_resize/1.jpg";

    start = (double ) clock();
    UNetOnnx onnx_model(model_path);
    end = (double ) clock();
    std::cout << "init time: " << (end - start) / CLOCKS_PER_SEC << " s" << std::endl;

    start = (double ) clock();
    cv::Mat result = onnx_model.infer(sampleImage);
    cv::imwrite("out.png", result);
    end = (double ) clock();
    std::cout << "infer time: " << (end - start) / CLOCKS_PER_SEC << " s" << std::endl;

    start = (double ) clock();
    cv::Mat result1 = onnx_model.infer(sampleImage);
    end = (double ) clock();
    std::cout << "infer in second: " << (end - start) / CLOCKS_PER_SEC << " s" << std::endl;

}